package org.example.jdk8;

import java.util.function.Function;
import java.util.function.Supplier;

public class test3 {
    public static void main(String[] args) {
//        Student student = new Student();
        Supplier<Student> supplier = Student::new;
        System.out.printf(supplier.get().getName());
        Function<String, Student> function = Student::new;
        System.out.println(function.apply("bbb").getName());
    }
}
class Student{
    public Student(){}
    public Student(String name){
        this.name = name;
    }

    public String name = "aaa";

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}